package com.hnas.core.service;

import java.util.Collection;
import java.util.List;

import javax.persistence.EntityManager;

import org.springframework.dao.DataAccessException;

import com.hnas.core.dao.PageBean;


/**
 * @author zybluesky
 *
 */
public interface IBaseService {

	public Object findByID(Class clazz, Long id);
	public Object findByID(Class clazz, Integer id);
	public Object saveOrUpdate(Object obj);	
	public Object saveOrUpdatef(Object obj);
	//��ҳ��ѯ
	public void queryByPage(PageBean page, String hql, Object[] paras) throws DataAccessException, Exception;
	public void delete(Object o) ;
	public Collection saveOrUpdateAll(Collection c) ;
	
//	public void queryByPage(final PageBean page, final String sql, final Object[] paras, final IResultSet rsHandler);
//	public List getList(final String sql0, final Object[] paras, final IResultSet rsHandler);

	public List getList(String hql, Object ob2[]);

//	public Session openSession() ;
	EntityManager getEntityManager();
	 void update(Object obj);
	 void updateAll(Collection c);
}
